home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
misc
/
avmNfax1_33.lha
/
AVMSuite
/
rexx
/
efaxview.avm
< prev
next >
Wrap
Text File
|
1994-06-24
|
1KB
|
46 lines
/* efax viewer */
parse arg filename .
base = filename || '.'
do i = 1 to 999
if ~exists(base || right(i, 3, '0')) then break
end
lastPage = i - 1
currentPage = 1
/* extract filename base */
lcolon = lastpos(':', filename)
lslash = lastpos('/', filename)
if lcolon > lslash then last = lcolon
else last = lslash
last = last
faxFileName = right(filename, length(filename) - last)
do forever
address command 'avm:gnu/fax2iff' '-o faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0') base || right(currentPage, 3, '0')
if rc = 0 then do
address command 'avm:avmfaxview faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0') currentPage lastPage
retVal = rc
call delete('faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0'))
if retVal = 1 then do
currentPage = currentPage - 1
if currentPage < 1 then currentPage = 1
end; else if retVal = 2 then do
currentPage = currentPage + 1
end; else if retVal = 0 then do
signal done
end; else do
currentPage = currentPage + 1
end
end; else do
currentPage = currentPage + 1
end
if currentPage > lastPage then signal done
end
done: